home *** CD-ROM | disk | FTP | other *** search
/ PC World 2006 February / PCWorld_2006-02_cd.bin / software / vyzkuste / tnt / tnt.exe / {app} / plugins / CMD AutoComplete.ttp < prev    next >
INI File  |  2005-03-15  |  2KB  |  58 lines

  1. [SETTINGS]
  2. category=Windows Tweaks::System::Command Prompt::AutoComplete
  3. Caption=AutoComplete Key
  4. version=1.0
  5. OSVERSION=2000,XP,2003
  6. #=The 'AutoComplete' feature lets users type a character and then press a designated key to automatically complete the filename or directory.
  7. #=\nSelect a key combination which will be used for filename or directory completion. You can also disable the feature if you want by selecting 'None'.
  8. #=\n\nNote: If the command being typed uses a directory name (such as "cd"), then the system automatically uses directory completion even if you press the filename completion key.
  9. Author=
  10.  
  11.  
  12. [INTERFACE]
  13. TYPE=multi
  14. type0=droplist
  15. Text0=Filename completion key (default = Tab)
  16. type1=droplist
  17. Text1=Directory completion key (default = None)
  18.  
  19.  
  20.  
  21.  
  22. [SCRIPT]
  23. Dim strkey2, strkey, arrTxt, arrHex
  24. '9 = tab, 4 = ctrl+d, 6 = ctrl+f
  25. strkey="HKCU\Software\Microsoft\Command Processor\CompletionChar"
  26. strkey2="HKCU\Software\Microsoft\Command Processor\PathCompletionChar"
  27. arrTxt = Array("None","Ctrl+A","Ctrl+B","Ctrl+D","Ctrl+E","Ctrl+F","Ctrl+G","Tab","Ctrl+K","Ctrl+L","Ctrl+N","Ctrl+O","Ctrl+P","Ctrl+Q","Ctrl+R","Ctrl+T","Ctrl+U","Ctrl+V","Ctrl+W","Ctrl+X","Ctrl+Y","Ctrl+Z","Ctrl+[","Ctrl+\","Ctrl+]","Ctrl+^","Ctrl+_")
  28. arrHex = Array(0,1,2,4,5,6,7,9,11,12,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31)
  29. Sub OnInit() 
  30. Dim i,s1,s2
  31. for i =0 to UBound(arrtxt)
  32. SetItemTextEx 0, i, arrTxt(i)
  33. SetItemTextEx 1, i, arrTxt(i)
  34. next
  35.  
  36. s1=RegReadValueD(strkey)
  37. s2=RegReadValueD(strkey2)
  38.  
  39. 'default
  40. SetCurSel 0, 0
  41. SetCurSel 1, 0
  42.  
  43. for i = 0 to UBound(arrHex) 
  44. if arrHex(i) = s1 then SetCurSel 0, i
  45. if arrHex(i) = s2 then SetCurSel 1, i
  46. next
  47.  
  48.  
  49. End Sub
  50.  
  51. Sub OnApply(x,y)
  52. Dim i
  53. i = GetCurSel(0)
  54. if -1 <> i then RegWriteValueD strkey, arrHex(i)
  55. i = GetCurSel(1)
  56. if -1 <> i then RegWriteValueD strkey2, arrHex(i)
  57. End Sub
  58.